package com.xr.core.system.common.exception;

import com.xr.core.system.common.enums.ResultEnum;

public class ServiceException extends RuntimeException {

    private static final long serialVersionUID = -1372752282914104603L;

    private ResultEnum code;

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, ResultEnum code) {
        super(message);
        this.code = code;
    }

    public ResultEnum getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return super.getMessage();
    }

}
